package com.flick.fein;

import com.flick.common.CommonPage;
import com.flick.common.Result;
import com.flick.vo.payment.OrderVo;
import com.flick.vo.payment.UserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("cloud-payment")
public interface PaymentFein {

    @GetMapping("/api/order/list")
    Result<List<OrderVo>> list();

    @GetMapping("/api/order/page")
    Result<CommonPage<OrderVo>> page(@RequestParam("page") Integer page, @RequestParam("size") Integer size);

    @GetMapping("/api/user/list")
    Result<List<UserVo>> userlist();

    @GetMapping("/api/user/page")
    Result<CommonPage<UserVo>> userpage(@RequestParam("page") Integer page, @RequestParam("size") Integer size);

    @PostMapping("/api/user")
    Result<String> usersave(@RequestParam("sec") Integer sec);
}
